package chen.web.config.spring;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import chen.web.message.MessageManager;
import chen.web.message.MessageManagerImpl;
import chen.web.message.SecurityMessageManager;
import chen.web.user.AccountManager;

@Configuration
public class MessageManagerConfig {

	//账号管理
	private @Autowired AccountManager accountManager = null;
	
	//短消息管理
	public @Bean MessageManager messageManager(){
		return new SecurityMessageManager(new MessageManagerImpl(accountManager));
	}
}
